<script setup lang="ts">
import MyHeader from '@/components/MyHeader.vue'
import { computed } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()
const showHeader = computed(() => {
  return !route.meta.noHeader
})
</script>

<template>
  <div class="wrapper">
    <MyHeader v-if="showHeader"></MyHeader>
    <router-view v-slot="{ Component }">
      <transition>
        <component :is="Component" />
      </transition>
    </router-view>
  </div>
</template>

<style scoped>
.wrapper {
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-flow: column nowrap;
}
</style>
